<#include "../common/layout.ftl"/>
<@layout>
<div class="well">

	<form id="form1" method="post" action="/recharge/driverChargeDetail?driverId=${driverId}" class="form-inline">
		<span class="label label-success">代驾员账户消费记录</span>
		开始时间<input type="text" class="input-medium" style="height: 26" name="beginDate" value="${beginDate!""}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"/> -
		结束时间<input type="text" class="input-medium" style="height: 26" name="endDate" value="${endDate!""}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"/>
		订单类型<select name="order_type">
							<option value="1" ></option>
							<option value="DRIVER" <#if order_type=="DRIVER">selected</#if>>酒后代驾</option>
							<option value="DELIVERY" <#if order_type=="DELIVERY">selected</#if>>同城配送</option>
							<option value="UNLOCK" <#if order_type=="UNLOCK">selected</#if>>保镖特卫</option>
							<option value="PARK" <#if order_type=="PARK">selected</#if>>代客泊车</option>
					</select>
		<button type="submit" class="btn btn-primary"><i class="icon-search icon-white"></i>查看</button>
		<button type="button" class="btn btn-info" onclick="javascript:history.back();">返回</button>
	</form>
  </div>

<div class="well">

	<table class="table table-bordered table-striped">
		<thead>
		  <tr>
		  	<th>消费时间</th>
		  	<th>姓名</th>
		  	<th>工号</th>
		  	<th>订单号</th>
		  	<th>支付类型</th>
		    <th>消费金额</th>
			<th>交易后余额</th>
			<th>订单公里数</th>
			<th>订单总额</th>
			<th>交易类型</th>
			<th>订单类型</th>
			<th>备注</th>
		  </tr>
		</thead>
		<tbody>
		<#if page??>
		<#list page.list as charge>
		  <tr>
		  	<td>
			  <#if charge.payment_time??> 
			     ${charge.payment_time?string("yyyy-MM-dd HH:mm:ss") }  
			  </#if>
			</td>
			<td>
			  ${charge.driverName!""}
			</td>
			<td>
			  ${charge.jobNumber!""}
			</td>
			<td>
			  ${charge.order_id!""}
			</td>
			<td>
			<#if charge.paytype??>
				 <#if charge.paytype == 0>
			  	<span class="label label-info">现金</span>
			  <#elseif charge.paytype == 1>
			  	<span class="label label-warning">余额支付</span>
			  <#elseif charge.paytype == 2>
			  	<span class="label label-success">VIP支付</span>
			  <#elseif charge.paytype == 3>
			  	<span class="label label-success">微信支付</span>
			  <#else>
			  	<span class="label label-inverse">其他</span>
			  </#if>
			  </#if>
			</td>
		    <td>
		    <#if charge.paytype??>
		    	<#if charge.paytype==0>
		    		<#if charge.order_id??>
			  			-${charge.daymoney?string(",##0.00")}
			  		<#else >
			  			${charge.daymoney?string(",##0.00")}
			  		</#if>
			  	<#else>
			  		+${charge.cur_income?string(",##0.00")}
			  	</#if>
			  	<#else>
			  	-${charge.daymoney?string(",##0.00")}
			  	</#if>
			</td>
			<td>
			  ${charge.cur_balance?string(",##0.00")}
			</td>
			<td>
				<#if charge.totalmoney??>
			  		${charge.kilometre!""}
			  		</#if>
			</td>
			<td>
				￥${charge.totalmoney !""}
			</td>
			<td>
			  <#if charge.commissiontype??>
			  	<#if charge.commissiontype == 1>
			  		可降比例扣款
			  	<#elseif charge.commissiontype == 2>
			  		固定比例提成
			  	<#elseif charge.commissiontype == 3>
			  		使用按天提成
			  	</#if>
			  </#if>
			</td>
			<td>
				<#if charge.order_type??>
			  	<#if charge.order_type == 'DRIVER'>
			  		酒后代驾
			  	<#elseif charge.order_type == 'DELIVERY'>
			  		同城配送
			  	<#elseif charge.order_type == 'UNLOCK'>
			  		保镖特卫
	  			<#elseif charge.order_type == 'PARK'>
			  		代客泊车
			  	</#if>
			  </#if>
			</td>
			<td>
			  ${charge.remarks!""}
			</td>
		  </tr>
		</#list>
		</#if>
		</tbody>
	</table>  
	<#include "../common/paginate.ftl" />
	<#if page??>
	<@paginate currentPage=page.pageNumber totalPage=page.totalPage actionUrl="/recharge/driverChargeDetail/" urlParas="?driverId=${driverId}&beginDate=${beginDate}&endDate=${endDate}&order_type=${order_type }"/>
	</#if>
</div>
<script type="text/javascript" src="/js/wdatePicker/WdatePicker.js"></script>
</@layout>